package com.future.mayi.fragment;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.future.mayi.activity.BasePage;
import com.future.mayi.R;
import com.future.mayi.app.App;
import com.future.mayi.utils.HCUtils;


/**
 * Created by 周大虎 on 2017/3/6.
 */

public class ImagePage extends BasePage {

    private String url;
    private Context context;
    private ImageView imageView;

    public ImagePage(Context context) {
        super(context);
        this.context = context;
    }

    @Override
    protected View initLayout() {
        return setContentView(R.layout.item_index_carousel);
    }

    @Override
    protected void initView() {
        imageView = (ImageView) findViewById(R.id.iv_index_carousel);
    }

    @Override
    protected void initDates() {

    }

    @Override
    protected void initListener() {
    }


    public void setData(String s) {
        if (s == null)
            this.url = null;
        else
            this.url = s;
        HCUtils.loadWebImg(App.getmContext(), imageView, url);
    }
}
